setExact

open fun setExact(@NonNull alarmManager: @NonNull AlarmManager, type: Int, triggerAtMillis: Long, @NonNull operation: @NonNull PendingIntent)(source)

Deprecated

Call setExact directly.

Schedule an alarm to be delivered precisely at the stated time.

This method is like set, but does not permit the OS to adjust the delivery time. The alarm will be delivered as nearly as possible to the requested trigger time.

Note: only alarms for which there is a strong demand for exact-time delivery (such as an alarm clock ringing at the requested time) should be scheduled as exact. Applications are strongly discouraged from using exact alarms unnecessarily as they reduce the OS's ability to minimize battery use.

Parameters

alarmManager

AlarmManager instance used to set the alarm

triggerAtMillis

time in milliseconds that the alarm should go off, using the appropriate clock (depending on the alarm type).

operation

Action to perform when the alarm goes off; typically comes from IntentSender.getBroadcast().

See also

android.content.Context